package com.zzl.bonds.ticket.constant.status;

/**
 * 开立申请表 转让申请表里的  预兑付 状态枚举值
 *
 * @author : spp
 * @date : 2022/1/4 14:40
 */
public enum AdvancePaymentStatusEnum {
    /**
     *
     */
    CANNOT(0, "未进行预兑付"),
    COULD(1, "已进行预兑付");

    private Integer code;
    private String description;

    AdvancePaymentStatusEnum(Integer code, String description) {
        this.code = code;
        this.description = description;
    }

    /**
     * 通过code获取是否可以转让
     *
     * @param code code
     * @return 是否可以转让
     */
    public static AdvancePaymentStatusEnum getEnum(Integer code) {
        for (AdvancePaymentStatusEnum value : AdvancePaymentStatusEnum.values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }
}
